<template>
  <div class="bubble">
    <div v-if="bubble.sponsor" class="bubble-bg green-bg">{{ bubble.msg }}</div>
    <div v-if="!bubble.sponsor" class="bubble-bg white-bg">
      {{ bubble.msg }}
    </div>
  </div>
</template>

<script>
export default {
  name: "MsgBubble",
  props: {
    bubble: {
      sponsor: true,
      msg: "",
      user: {
        id: "",
        name: ""
      }
    }
  },
  data() {
    return {};
  }
};
</script>

<style lang="less" scoped>
.bubble {
  margin: 5px 5px 0p 5px;
  .bubble-bg {
    padding: 10px;
    color: #2c2c2c;
    border-radius: 10px;
  }
  .green-bg {
    background: #9eea6a;
  }
  .white-bg {
    background: white;
    justify-content: flex-end;
  }
}
</style>
